<?php

class Application_Form_modifierlistecolonne extends Zend_Form
{

    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	
    	
    	$this->setName("Formulairemodifierlistcolonnes");
    	 
    	$id = new Zend_Form_Element_Hidden('idPILOT_LISTCOLUMN');
    	$id->setLabel('');
    	
    	$mapper= new Application_Model_Mapper_PilotPlateforme();
    	$select=$mapper->fetchAllToArray();
    	     	 
    	$tmp=array();
    	$tmp['']="selectionner plateforme";
    	foreach ($select as $key => $value ){
    		$tmp[ $value['idPILOT_PLATEFORME'] ] = $value['LABEL'];
    	}
    	$listplat = array("multiOptions" => $tmp);
    	 
    	$plateforme= new Zend_Form_Element_Select('PILOT_PLATEFORME_idPILOT_PLATEFORME',  $listplat);
    	$plateforme->setLabel('Nom du Plateforme')	;
    	
    	$description = $this->CreateElement('textarea', 'DESCRIPTION');
    	$description->setAttrib('rows', '7');
    	$description->setAttrib('cols', '35');
    	$description->setLabel('Description');
    	
    	$label = new Zend_Form_Element_Text('LABELCOLUMN');
    	$label->setLabel('Label');
    	
    	$table = new Zend_Form_Element_Text('TABELCOLUM');
    	$table->setLabel('Table');
    	
    	$colum = new Zend_Form_Element_Text('COLUMNNAME');
    	$colum->setLabel('Colum');
    	
    	$operation = new Zend_Form_Element_Text('OPERATIONSQL');
    	$operation->setLabel('Operation');
    	
    	$definir = new Zend_Form_Element_Submit("submit");
    	$definir->setLabel("Modifier");
    	
    	$this->addElements(array($id,$plateforme,$description,$label,$table,$colum,$operation,$label,$definir));
    	$this->setDecorators( array( array('ViewScript', array('viewScript' => 'protypeform.phtml'))));
    }
}

